package Presentacion;

import ModeloLogicoSistema.AdministradorOrden;
import ModeloLogicoSistema.AdministradorStock;
import ModeloLogicoSistema.ImprimirListadoPlanchadoPendiente;
import ModeloLogicoSistema.Imprimir_delivery;
import ModeloLogicoSistema.Orden;
import ModeloLogicoSistema.RespaldoBD;
import ModeloLogicoSistema.Validacion;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Image;
import com.toedter.calendar.JDateChooser;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.Toolkit;
import java.io.FileNotFoundException;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
 *
 * @author debo
 * 
 */
public class VentanaPrincipal extends javax.swing.JDialog {
    private ArrayList<Orden> ordenes = null;
    private SimpleDateFormat formateador = new SimpleDateFormat("dd/MM/yyyy");
    Calendar c = new GregorianCalendar();
    private Calendar calendar;
    private Date date;
    private String fecha;
    Integer cod;
    AdministradorOrden admOrdenes;
    CalendarioPpal cal;
    Container container;
    /**
     * Creates new form VentanaPrincipal
     */
    public VentanaPrincipal(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        this.setLocationRelativeTo(null);
        date = new Date();
        container = this.getContentPane();
        
        
        container.setLayout(new FlowLayout());
        cal=new CalendarioPpal();
        container.add(cal);
        
        this.pack();
    }
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuBar1 = new javax.swing.JMenuBar();
        MenuOrden = new javax.swing.JMenu();
        MenuItemAgregarOrden = new javax.swing.JMenuItem();
        MenuItemConsultarOrden = new javax.swing.JMenuItem();
        MenuServicio = new javax.swing.JMenu();
        menuItemNuevoServicio = new javax.swing.JMenuItem();
        menuConsultarServicios = new javax.swing.JMenuItem();
        MenuCliente = new javax.swing.JMenu();
        jMenuItemAgregarCliente = new javax.swing.JMenuItem();
        jMenuItemModificarCliente = new javax.swing.JMenuItem();
        jMenuItemAnularCliente = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();
        MenuItemIngresarStock = new javax.swing.JMenuItem();
        menuItemEgresoStock = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        menuInformeContable = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        jMenuItem6 = new javax.swing.JMenuItem();
        jMenuItem7 = new javax.swing.JMenuItem();
        menuRespaldo = new javax.swing.JMenu();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();

        jMenuItem1.setText("jMenuItem1");

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Sistema Lavandería");
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setFocusable(false);
        setIconImage(getIconImage());

        MenuOrden.setText("Orden");

        MenuItemAgregarOrden.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/order.png"))); // NOI18N
        MenuItemAgregarOrden.setText("Nueva Orden");
        MenuItemAgregarOrden.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuItemAgregarOrdenActionPerformed(evt);
            }
        });
        MenuOrden.add(MenuItemAgregarOrden);

        MenuItemConsultarOrden.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Modificar.png"))); // NOI18N
        MenuItemConsultarOrden.setText("Consultar Orden");
        MenuItemConsultarOrden.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuItemConsultarOrdenActionPerformed(evt);
            }
        });
        MenuOrden.add(MenuItemConsultarOrden);

        jMenuBar1.add(MenuOrden);

        MenuServicio.setText("Servicio");

        menuItemNuevoServicio.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Lavadora.jpg"))); // NOI18N
        menuItemNuevoServicio.setText("Nuevo Servicio");
        menuItemNuevoServicio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuItemNuevoServicioActionPerformed(evt);
            }
        });
        MenuServicio.add(menuItemNuevoServicio);

        menuConsultarServicios.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Buscar.png"))); // NOI18N
        menuConsultarServicios.setText("Consultar Servicios");
        menuConsultarServicios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuConsultarServiciosActionPerformed(evt);
            }
        });
        MenuServicio.add(menuConsultarServicios);

        jMenuBar1.add(MenuServicio);

        MenuCliente.setText("Cliente");

        jMenuItemAgregarCliente.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Add Client.png"))); // NOI18N
        jMenuItemAgregarCliente.setText("Nuevo Cliente");
        jMenuItemAgregarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemAgregarClienteActionPerformed(evt);
            }
        });
        MenuCliente.add(jMenuItemAgregarCliente);

        jMenuItemModificarCliente.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/idbuscar.png"))); // NOI18N
        jMenuItemModificarCliente.setText("Modificar Cliente");
        jMenuItemModificarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemModificarClienteActionPerformed(evt);
            }
        });
        MenuCliente.add(jMenuItemModificarCliente);

        jMenuItemAnularCliente.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/remove client.png"))); // NOI18N
        jMenuItemAnularCliente.setText("Dar de Baja Cliente");
        jMenuItemAnularCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemAnularClienteActionPerformed(evt);
            }
        });
        MenuCliente.add(jMenuItemAnularCliente);

        jMenuBar1.add(MenuCliente);

        jMenu1.setText("Stock");

        jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/stock_id.png"))); // NOI18N
        jMenuItem2.setText("Nuevo Producto");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem2);

        MenuItemIngresarStock.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/changoLleno.jpg"))); // NOI18N
        MenuItemIngresarStock.setText("Ingreso Stock");
        MenuItemIngresarStock.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuItemIngresarStockActionPerformed(evt);
            }
        });
        jMenu1.add(MenuItemIngresarStock);

        menuItemEgresoStock.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Cesto2.jpg"))); // NOI18N
        menuItemEgresoStock.setText("Egreso Stock");
        menuItemEgresoStock.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuItemEgresoStockActionPerformed(evt);
            }
        });
        jMenu1.add(menuItemEgresoStock);

        jMenuItem3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Buscar.png"))); // NOI18N
        jMenuItem3.setText("Consultar Stock");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem3);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Contabilidad");

        menuInformeContable.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/calculadora.png"))); // NOI18N
        menuInformeContable.setText("Ver Informe");
        menuInformeContable.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuInformeContableActionPerformed(evt);
            }
        });
        jMenu2.add(menuInformeContable);

        jMenuBar1.add(jMenu2);

        jMenu3.setText("Listados");

        jMenuItem6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/delivery.png"))); // NOI18N
        jMenuItem6.setText("Imprimir Listado Delivery");
        jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem6ActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItem6);

        jMenuItem7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/iron.png"))); // NOI18N
        jMenuItem7.setText("Imprimir Listado Planchado");
        jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem7ActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItem7);

        jMenuBar1.add(jMenu3);

        menuRespaldo.setText("Respaldo DB");

        jMenuItem4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/BackUP.png"))); // NOI18N
        jMenuItem4.setText("Backup");
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });
        menuRespaldo.add(jMenuItem4);

        jMenuItem5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Restauracion.png"))); // NOI18N
        jMenuItem5.setText("Restaurar DB");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });
        menuRespaldo.add(jMenuItem5);

        jMenuBar1.add(menuRespaldo);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 920, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 479, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

        public java.awt.Image getIconImage() {
            java.awt.Image retValue = Toolkit.getDefaultToolkit().
                getImage(ClassLoader.getSystemResource("Imagenes/jabon.png"));


            return retValue;
        }
    
    private void menuInformeContableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuInformeContableActionPerformed
        Contabilidad contable=new Contabilidad(null, rootPaneCheckingEnabled);
    }//GEN-LAST:event_menuInformeContableActionPerformed

    private void MenuItemConsultarOrdenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuItemConsultarOrdenActionPerformed
        try {
            BuscarOrden buscarOrden = new BuscarOrden(null, rootPaneCheckingEnabled);
            buscarOrden.setVisible(true);
            /*container.remove(cal);
            cal=new CalendarioPpal();
            container.add(cal);*/
            
            
            this.container.remove(cal);
            container = this.getContentPane();
            container.setLayout(new FlowLayout());
            cal=new CalendarioPpal();
            container.add(cal);
            
        } catch (Exception e) {
        }

    }//GEN-LAST:event_MenuItemConsultarOrdenActionPerformed

    private void menuItemNuevoServicioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuItemNuevoServicioActionPerformed
        AltaServicio altaServicio1 = null;
        try {
            altaServicio1 = new AltaServicio(null, rootPaneCheckingEnabled);
        } catch (SQLException ex) {
            Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        }
        altaServicio1.setVisible(true);
    }//GEN-LAST:event_menuItemNuevoServicioActionPerformed

    private void menuConsultarServiciosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuConsultarServiciosActionPerformed
        BuscarServicios buscarServicios = new BuscarServicios(null, rootPaneCheckingEnabled);
        buscarServicios.setVisible(true);
    }//GEN-LAST:event_menuConsultarServiciosActionPerformed

    private void MenuItemAgregarOrdenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuItemAgregarOrdenActionPerformed
            AltaOrden altaDeOrden = null;
            try {
                altaDeOrden = new AltaOrden(null, rootPaneCheckingEnabled);
            } catch (SQLException ex) {
                Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
            }
            altaDeOrden.setVisible(true);
            /*this.container.remove(cal);
            this.cal=new CalendarioPpal();
            this.container.add(cal);*/
            this.container.remove(cal);
            container = this.getContentPane();
            
            
            container.setLayout(new FlowLayout());
            cal=new CalendarioPpal();
            container.add(cal);
        
    }//GEN-LAST:event_MenuItemAgregarOrdenActionPerformed

    private void jMenuItemAgregarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAgregarClienteActionPerformed
        AltaCliente altaCliente1 = null;
        try {
            altaCliente1 = new AltaCliente(null, rootPaneCheckingEnabled);
        } catch (SQLException ex) {
            Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        }
        altaCliente1.setVisible(true);
    }//GEN-LAST:event_jMenuItemAgregarClienteActionPerformed

    private void jMenuItemModificarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemModificarClienteActionPerformed
        BuscarCliente buscarCliente = new BuscarCliente(null, rootPaneCheckingEnabled);
        buscarCliente.habilitarModificacion();
        buscarCliente.setVisible(true);
    }//GEN-LAST:event_jMenuItemModificarClienteActionPerformed

    private void jMenuItemAnularClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAnularClienteActionPerformed
        BuscarCliente buscarCliente = new BuscarCliente(null, rootPaneCheckingEnabled);
        buscarCliente.habilitarEliminar();
        buscarCliente.setVisible(true);
    }//GEN-LAST:event_jMenuItemAnularClienteActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        try {
            AdministradorStock adm = new AdministradorStock();
            Integer cod = adm.getUltimoCodigoProducto();
            String desc = JOptionPane.showInputDialog(null, "Código Producto " + cod + "\n Ingrese la descripción del producto", "Nuevo Producto", JOptionPane.PLAIN_MESSAGE);
            try{
                if(Validacion.numeroSinLetras(desc)){
                    JOptionPane.showMessageDialog(null, "El nombre de producto no es válido", "Nombre Inválido", JOptionPane.INFORMATION_MESSAGE);
                    return;
                }
                    
                if(adm.nombreDeProductoTomado(desc)){
                    JOptionPane.showMessageDialog(null, "El producto que desea dar de alta, ya existe en memoria.\n"
                            + "Verifique si el producto a ingresar es el mismo, \n"
                            + "o si desea ingresar el nuevo producto bajo otro nombre.", "Nombre existente", JOptionPane.INFORMATION_MESSAGE);
                    return;
                }   
            }catch (Exception e){}
        
            int cantEnStock = 0;
            if (desc != null) {
                if (!desc.isEmpty()) {
                    adm.setProducto(desc, cantEnStock);
                }
            }
        } catch (SQLException ex) {
            Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        BuscarEnStock consulta = new BuscarEnStock(null, rootPaneCheckingEnabled);
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void MenuItemIngresarStockActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuItemIngresarStockActionPerformed
        IngresoStock ing=new IngresoStock(null,rootPaneCheckingEnabled);
    }//GEN-LAST:event_MenuItemIngresarStockActionPerformed

    private void menuItemEgresoStockActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuItemEgresoStockActionPerformed
        try {
            EgresoProducto eg=new EgresoProducto(null,rootPaneCheckingEnabled);
        } catch (SQLException ex) {
            Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_menuItemEgresoStockActionPerformed

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        RespaldoBD respaldo=new RespaldoBD();
        
        try {
            respaldo.backup();
        }catch(Exception e){
        
        }
    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed
        JDateChooser seleccionadorFecha=new JDateChooser();
        seleccionadorFecha.setDateFormatString("dd/MM/yyyy");
        int resultado=JOptionPane.showOptionDialog(null, seleccionadorFecha, "Seleccione fecha", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null);
        String fecha;
        try{
            if(resultado==JOptionPane.OK_OPTION)
                fecha=this.formateador.format(seleccionadorFecha.getDate());
            else{
                return;
            }
            
        }catch(Exception e){
            JOptionPane.showMessageDialog(null, "No ingreso una fecha válida");
            return;
        }
        try {
            Imprimir_delivery imprimir=new Imprimir_delivery(fecha);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        } catch (DocumentException ex) {
            Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem6ActionPerformed

    private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem7ActionPerformed
        JDateChooser seleccionadorFecha=new JDateChooser();
        seleccionadorFecha.setDateFormatString("dd/MM/yyyy");
        int resultado=JOptionPane.showOptionDialog(null, seleccionadorFecha, "Seleccione fecha", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null);
        String fecha;
        try{
            if(resultado==JOptionPane.OK_OPTION)
                fecha=this.formateador.format(seleccionadorFecha.getDate());
            else{
                return;
            }
        }catch(Exception e){
            JOptionPane.showMessageDialog(null, "No ingreso una fecha válida");
            return;
        }
        try {
            ImprimirListadoPlanchadoPendiente imprimir=new ImprimirListadoPlanchadoPendiente(fecha);
           
        } catch (FileNotFoundException ex) {
            Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        } catch (DocumentException ex) {
            Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem7ActionPerformed

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
        RespaldoBD respaldo=new RespaldoBD();
        
        try {
            respaldo.restore();
           
        } catch (Exception ex) {
            Logger.getLogger(VentanaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem5ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VentanaPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                VentanaPrincipal dialog = new VentanaPrincipal(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu MenuCliente;
    private javax.swing.JMenuItem MenuItemAgregarOrden;
    private javax.swing.JMenuItem MenuItemConsultarOrden;
    private javax.swing.JMenuItem MenuItemIngresarStock;
    private javax.swing.JMenu MenuOrden;
    private javax.swing.JMenu MenuServicio;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem jMenuItem7;
    private javax.swing.JMenuItem jMenuItemAgregarCliente;
    private javax.swing.JMenuItem jMenuItemAnularCliente;
    private javax.swing.JMenuItem jMenuItemModificarCliente;
    private javax.swing.JMenuItem menuConsultarServicios;
    private javax.swing.JMenuItem menuInformeContable;
    private javax.swing.JMenuItem menuItemEgresoStock;
    private javax.swing.JMenuItem menuItemNuevoServicio;
    private javax.swing.JMenu menuRespaldo;
    // End of variables declaration//GEN-END:variables
    /**
     *
     * @param evt
     * @return
     */
}
